package com.alfayun.fiscalriskanalysis.javaFunction;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
import java.util.function.Function;

public class Percent implements Function<List<BigDecimal>, BigDecimal> {

	@Override
	public BigDecimal apply(List<BigDecimal> params) {
		return params.get(0).divide(params.get(1), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
	}

}
